<template>
	<view class="classLayout pageBg">
		<custom-nav-bar title="分类"></custom-nav-bar>
		<view class="classfy">
			<theme-item v-for="item in classifyList"
			 :key="item._id"
			 :item="item"
			 ></theme-item>
		</view>
	</view>
</template>

<script setup>
import {ref} from "vue"
import {onShareAppMessage,onShareTimeline} from "@dcloudio/uni-app"
import {apigetClassify} from "@/api/apis.js"
const classifyList = ref([])



const getClassify = async ()=> {
	let res = await apigetClassify({
		pageSize:15
	})
	classifyList.value = res.data
	console.log(res);
}
getClassify()


//分享给好友
onShareAppMessage((e)=>{
	// console.log(e,'eeeeee');
	return {
		title:"小螃蟹壁纸,精选分类",
		// path:'/pages/index/index'
		path:'/pages/classfy/classfy'
	}
})

//分享朋友圈
onShareTimeline(()=>{
	return {
		title:'小螃蟹壁纸,精选分类',
		// imageUrl:'https://imgoss.ilive.cn/image/202504/16/1744776999288_365x204.png.jpg'
	    imageUrl:'/static/images/logo2.jpg'
	}
})

</script>

<style lang="scss" scoped>
.classfy{
	padding: 30rpx;
	display: grid;
	grid-template-columns: repeat(3,1fr);
	//间距
	gap:15rpx;
}
</style>
